cc.Class({
    extends: cc.Component,

    properties: {
        //背景音乐
        bgAudio:{
            default:null,
            url:cc.AudioClip,
        },
        //设置按钮
        setBtn:cc.Node,
        //开始按钮
        startBtn:cc.Node,
        getHelp:cc.Node,
    },

    onLoad:function(){
        cc.audioEngine.playMusic(this.bgAudio, true);
        cc.director.preloadScene('Game');
        cc.director.preloadScene("setting");
        //cc.log("kaishi1");
        this.startBtn.on(cc.Node.EventType.TOUCH_START,this.startGame);
        this.setBtn.on(cc.Node.EventType.TOUCH_START,this.setAudio);
        this.getHelp.on(cc.Node.EventType.TOUCH_START,this.help);
    },
    startGame: function() {
        cc.audioEngine.pauseMusic();
        cc.director.loadScene('Game');
    },
    setAudio:function(){
        cc.director.loadScene('setting');
    },
    help:function(){
        cc.director.loadScene("help");
    }

});
